<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>test</title>
  {js href="__CDN__jquery/1.11.0/jquery.min.js,__CDN__layui/2.2.4/layui.js,__CDN__nprogress/nprogress.js"}
</head>
<body>
<div><img id="js-captcha" src="{:captcha_src()}" alt='captcha' /></div>
<button id="js-check">验证</button>
<script>
$(function(){
  var c = "{:captcha_src()}?r=";
  $('#js-captcha').click(function(){
    $(this).attr('src',c+Math.random());
  });
})
</script>
</body>
</html>